//
//  ThreeImageCell.m
//  Focus
//
//  Created by dlios on 14-10-28.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ThreeImageCell.h"

@implementation ThreeImageCell
-(void)dealloc{
    [_titleLabel release];
    [_autherName release];
    [_date release];
    [_leftImage release];
    [_minImage release];
    [_rightImage release];
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        self.titleLabel = titleLabel;
        [titleLabel release];
        [self.contentView addSubview:self.titleLabel];
        
        UILabel *autherName = [[UILabel alloc]initWithFrame:CGRectZero];
        self.autherName = autherName;
        [autherName release];
        [self.contentView addSubview:self.autherName];
        
        UILabel *date = [[UILabel alloc]initWithFrame:CGRectZero];
        self.date = date;
        [date release];
        [self.contentView addSubview:self.date];
        
        UIImageView *leftImage = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.leftImage = leftImage;
        [leftImage release];
        [self.contentView addSubview:self.leftImage];
       
        UIImageView *minImage = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.minImage = minImage;
        [minImage release];
        [self.contentView addSubview:self.minImage];
        
        UIImageView *rightImage = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.rightImage = rightImage;
        [rightImage release];
        [self.contentView addSubview:self.rightImage];
        
        
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    //    CGFloat width = self.contentView.frame.size.width;
    //    CGFloat height = self.contentView.frame.size.height;
    self.titleLabel.frame = CGRectMake(20, 10, 200, 40);
    self.titleLabel.numberOfLines = 10;
    self.titleLabel.font = [UIFont systemFontOfSize:16];
    
    self.autherName.frame = CGRectMake(20, 60, 80, 30);
    self.autherName.font = [UIFont systemFontOfSize:12];
    self.date.frame = CGRectMake(120, 60, 80, 30);
    self.date.font = [UIFont systemFontOfSize:12];
    self.date.numberOfLines = 10;
    
    self.leftImage.frame = CGRectMake(20, 110, 90, 60);
    self.minImage.frame = CGRectMake(120,110 , 90, 60);
    self.rightImage.frame = CGRectMake(220, 110, 90, 60);
    
    
    
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
